package com.example.demo11.mapper;


import com.example.demo11.entity.students;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StudentMapper {
    @Select("SELECT * FROM students WHERE student_id = #{id}")// 修改查询语句
    students getStudentById(int id);
    @Select("SELECT * FROM students ")
    List<students> getStudent();


    @Delete("DELETE FROM students WHERE student_id = #{id}") // 修正列名和参数占位符
    int deleteStudentById(int id); // 添加删除方法


    

}






